package com.zushiye.order.service;

import com.zushiye.order.mapper.OrderMapper;
import com.zushiye.order.model.OrderItemBean;
import com.zushiye.order.model.request.OrderUpdateRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {

    @Autowired(required = false)
    private OrderMapper mapper;

    public int insert(OrderItemBean itemBean) {
        return mapper.insert(itemBean);
    }

    public int delete(String id) {
        return mapper.delete(id);
    }

    public List<OrderItemBean> queryAll(String user_id) {
        return mapper.queryAll(user_id);
    }

    public int updateState(OrderUpdateRequest req) {
        return mapper.updateState(req);
    }

}
